package com.cet.base.exception;

/**
 * @program: cet-practice
 * @description:
 * @author: 陈恩涛
 * @create: 2023-03-24 19:20
 **/
public class ExceptionTest {
    public static String tryCatchReturn() {
        try {
            testNPE();
            return  "OK";
        } catch (Exception e) {
            return "ERROR";
        } finally {
            System.out.println("tryCatchReturn");
        }
    }

    private static void testNPE() {
        throw new NullPointerException();
    }

    public static void main(String[] args) {
        System.out.println(tryCatchReturn());
    }

}
